class Node{
    constructor(value,next=null){
        this.value = value;
        this.next = next ;
    }
}

let a = new Node('a')
let b = new Node('b')
let c = new Node('c')
a.next = b
b.next = c

//对链表进行遍历的函数
function bianLink(node){
    temp = node 
    while(temp){
        console.log(temp.value)
        temp=temp.next
    }
}
console.log('==========')
bianLink(a)
console.log('==========')
bianLink(b)
console.log('==========')
bianLink(c)
console.log('==========')
